-- background: 55040 from stack: in -- bmap block id: 51938 -- flags: 0000 -- background id: 0 -- name: ----- HyperTalk script ----- on newStack extend end newStack on extend -- type "udvid" into the message box and press return to make -- a year's worth of new cards. if the name of this stack contains "Baggrundsideer" then answer "Opret venligst en ny stak, før den udvides." with "OK" else answer "Skal der laves kort til et nyt Ã¥r?" with "OK" or "Annuller" if it is "Annuller" then exit extend put 60*60*24 into OneDay --seconds in a day go to last card of this background put getStartDate() into start --what date to begin on if start is "Annuller" then exit extend repeat with cnt = 1 to 53 --weeks in a year put start into it --a copy convert it to long date delete item 1 of it -- get rid of "Mandag," put it into field "Uge" Repeat with index = 1 to 7 put word index of ("Mandag Tirsdag Onsdag Torsdag" && "Fredag Lørdag Søndag") into myDay put start into it --convert each day so that date rolls over to "1" --at end of month convert it to long date put (word 2 of item 2 of it) into field myDay add OneDay to start end repeat doMenu New Card end repeat doMenu "slet kort" --get rid of extra card at end end if end extend function getStartDate -- end of stack or today, whichever is newer get field "Uge" if it is empty then put the date into it put startOfWeek(it) into it --so we can compare put the date into thisWeek put startOfWeek(thisWeek) into thisWeek --both at week starts in seconds if thisWeek < 2587766400 then answer "Indstil Kontrolpanelet til dags dato" with "OK" return "Annuller" end if if it >= thisWeek then return it --calendar already beyond today convert it to short date convert thisWeek to short date answer "Startende fra hvilken dato?" with it or thisWeek or "Annuller" if it is "Annuller" then return it convert it to seconds return it end getStartDate function startOfWeek aDate -- the seconds for the start of this week put 60*60*24 into OneDay --seconds in a day put aDate into it convert it to long date repeat while item 1 of it <> "Mandag" convert it to seconds subtract OneDay from it convert it to long date end repeat convert it to seconds return it end startOfWeek on openBackground push recent card end openBackground -- part 11 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=68 top=27 right=47 bottom=381 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: Uge -- part 29 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=5 top=47 right=69 bottom=36 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Mandag -- part 30 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=129 top=47 right=69 bottom=160 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Tirsdag -- part 31 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=254 top=47 right=69 bottom=285 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Onsdag -- part 32 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=380 top=47 right=69 bottom=411 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Torsdag -- part 33 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=5 top=190 right=212 bottom=36 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Fredag -- part 34 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=129 top=190 right=212 bottom=160 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: L¿rdag -- part 35 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=254 top=190 right=212 bottom=285 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: S¿ndag -- part 12 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=5 top=79 right=185 bottom=130 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 22 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=129 top=79 right=185 bottom=252 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 23 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=254 top=79 right=185 bottom=378 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 24 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=380 top=79 right=185 bottom=506 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 25 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=5 top=222 right=328 bottom=127 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 26 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=129 top=222 right=328 bottom=252 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 27 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=254 top=222 right=328 bottom=378 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 28 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=380 top=222 right=302 bottom=506 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 2 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: -- part 37 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=380 top=25 right=51 bottom=417 -- title width / last selected line: 0 -- icon id / first selected line: 4432 / 4432 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: gŒ til Opgaver ----- HyperTalk script ----- on mouseUp go to card "Opgaver1" of "Kalender" end mouseUp -- part 38 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=418 top=22 right=48 bottom=455 -- title width / last selected line: 0 -- icon id / first selected line: 3430 / 3430 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Adresse ----- HyperTalk script ----- on mouseUp get the selection visual effect zoom open go to "Adresse" if it is not empty then find it end mouseUp -- part 39 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=381 top=309 right=334 bottom=408 -- title width / last selected line: 0 -- icon id / first selected line: 15420 / 15420 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Prev ----- HyperTalk script ----- on mouseUp visual effect wipe right go to previous card end mouseUp -- part 40 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=407 top=310 right=333 bottom=434 -- title width / last selected line: 0 -- icon id / first selected line: 16560 / 16560 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Next ----- HyperTalk script ----- on mouseUp visual effect wipe left go to next card end mouseUp -- part 41 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=475 top=310 right=335 bottom=506 -- title width / last selected line: 0 -- icon id / first selected line: 6720 / 6720 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return ----- HyperTalk script ----- on mouseUp visual effect iris close pop card end mouseUp -- part 42 (button) -- low flags: 00 -- high flags: 8004 -- rect: left=456 top=28 right=45 bottom=502 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: Udvid ----- HyperTalk script ----- on mouseUp extend end mouseUp -- part 43 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=348 top=23 right=52 bottom=380 -- title width / last selected line: 0 -- icon id / first selected line: 21700 / 21700 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Hjem ----- HyperTalk script ----- on mouseUp visual effect iris open go Home end mouseUp